home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / rs232of2.zip / RS232OFF.ASM < prev    next >
Assembly Source File  |  1989-02-11  |  823b  |  41 lines

  1.  
  2. ;RS232OFF.ASM  -  Turn off RS232 on all 4 COM ports
  3. ;By Keith Petersen, W8SDZ  -  February 11, 1989
  4.  
  5. ;Assemble with A86 shareware assembler
  6.  
  7.      cli             ;we don't want to be interrupted while we do this
  8.      mov al,0        ;get a zero for resetting everything
  9.  
  10. ;First turn off the UART interrupts on all four ports
  11.  
  12.      mov dx,03f9h    ;com1
  13.      out dx,al
  14.  
  15.      mov dx,02f9h    ;com2
  16.      out dx,al
  17.  
  18.      mov dx,03e9h    ;com3
  19.      out dx,al
  20.  
  21.      mov dx,02e9h    ;com4
  22.      out dx,al
  23.  
  24. ;Now turn off DTR and RTS on all four ports
  25.  
  26.      mov dx,03fch    ;com1
  27.      out dx,al
  28.  
  29.      mov dx,02fch    ;com2
  30.      out dx,al
  31.  
  32.      mov dx,03ech    ;com3
  33.      out dx,al
  34.  
  35.      mov dx,02ech    ;com4
  36.      out dx,al
  37.  
  38. ;We're done
  39.  
  40.      int 20h         ;standard end program interrupt
  41.